﻿using System;
using TaleWorlds.Library;
using TaleWorlds.Localization;

namespace MarriageFertility.Helpers
{
    public static class Log
    {
        public static Color CurrentColor = TextColor.White;

        public static void CommonMessage(string message)
        {
            InformationManager.DisplayMessage(new InformationMessage(message));
        }

        public static void CommonMessage(TextObject message)
        {
            CommonMessage(message.ToString());
        }

        public static void CommonMessage(string message, Color color)
        {
            InformationManager.DisplayMessage(new InformationMessage(message, color));
        }

        public static void CommonMessage(TextObject message, Color color)
        {
            CommonMessage(message.ToString(), color);
        }

        public static void ErrorMessage(string message)
        {
            InformationManager.DisplayMessage(new InformationMessage(message, TextColor.Red));
        }

        public static void ErrorMessage(TextObject message)
        {
            CommonMessage(message.ToString());
        }

        public static void StartMessage(TextObject message)
        {
            InformationManager.DisplayMessage(new InformationMessage(message.ToString(), TextColor.Green));
        }

        public static void ShowAllErrorMessage(Exception e)
        {
            ErrorMessage(e.Message);
            ErrorMessage(e.StackTrace);
        }
    }
}